package com.jielin.handling.entity.vo;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jielin.handling.bean.base.BaseSearch;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author chenzhang
 * @date 2019/9/6 - 15:00
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AllGoodsVo extends BaseSearch {
    private String id;
    private String name;
    private String caseName;
    private String caseCode;
    private String GoodsType;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createDate;
    private  String applyPolice;
    private  String goodsWarehousing;
    private  String findingsOfAudit;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private  Date startDate;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date endDate;
    private  String policeCode;
    private String number;
    private String ids;
    private String policeName;//民警姓名
    private String policeAndCode;//民警姓名



    @Override
    public void setQueryCondition(JSONObject queryCondition) {
        this.caseName=queryCondition.getString("caseName");
        this.caseCode=queryCondition.getString("caseCode");
        this.GoodsType=queryCondition.getString("GoodsType");
        this.policeCode=queryCondition.getString("policeCode");
        this.startDate=queryCondition.getDate("startDate");
        this.endDate=queryCondition.getDate("endDate");
        this.ids=queryCondition.getString("ids");
        this.goodsWarehousing=queryCondition.getString("goodsWarehousing");

    }
}
